<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>虚拟列表测试</title>
    <link rel="stylesheet" href="./index2.css">
</head>

<body style="background-color: black;">
    <div id="xunipage">
        <div class="focusSwitch" id="switchPage" f-focusid="range-0-2">
            <div class="focusVirtual focusVirtualY" f-totalsize="100000" f-curindex="0" f-scroll="Y"
                oncreateitem="createItemY"></div>
        </div>
    </div>
</body>
<script src="../focus2.2.js"></script>
<script>
    var framework = new LyFocusFrame("xunipage");
    console.log(framework);
    function createItemY(i) {
        return {
            html: '<div class="focusVirtual focusVirtualX" id="range-'+i+'" style="height:' + (100 + Math.random() * 200) + 'px;" f-totalsize="100000" f-curindex="0" f-scroll="X" oncreateitem="createItem(' + i + ')"></div>'
        }
    }

    function createItem(I, i) {
        return {
            html: '<div class="focusWidget range-item" style="width:' + (100 + Math.random() * 200) + 'px;" f-curindex="0" onfocus="setPage" id="range-' + I + '-' + i + '">' + I + '-' + i + '</div>'
        }
    }
</script>

</html>